import Layout from '../components/Layout'
/* 

hidden:true隐藏路由
alwaysShow:true 当路由下面的children只有一个时，不显示当前路由
*/
let routes = [
    {
        path: '/',
        component: Layout,
        title:'默认首页',
        alwaysShow:true,
        redirect:'/home',
        children:[
            {
                path:'home',
                title:'家',
                component:()=>import('../components/User')
            }
        ]
    },
    {
        path:'/login',
        component:()=>import('../view/Login'),
        title:'登录',
        hidden:true
    },
    {
        path:"/user",
        title:'用户管理',
        component:Layout,
        children:[
            {
                path:'list',
                title:'用户列表',
                component:()=>import('../view/user'),
            },
            
        ]
    },
    {
        path:'/product',
        title:'产品管理',
        component: Layout,
        children:[
            {
                path:'category',
                title:'品类管理',
                component:()=>import('../components/One')
            },
            {
                path:'product',
                title:'产品管理',
                component:()=>import('../components/One')
            },
            {
                path:'active',
                title:'活动管理',
                component:()=>import('../components/One')
            },
        ]
    }
]

export default routes